<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <title>Document</title>
    </head>
    <body>
        <canvas id="c" width="400" height="400" style="border: 1px solid #ccc"></canvas>

        <script>
            const context = document.getElementById('c')
            const ctx = context.getContext('2d')

            ctx.shadowOffsetX = 10
            ctx.shadowOffsetY = 10
            ctx.shadowColor = '#f38181'
            ctx.shadowBlur = 10
            ctx.fillStyle = '#fce38a'
            ctx.fillRect(30, 30, 200, 100)

            const text = '你好'
            ctx.font = 'bold 100px 黑体'
            ctx.fillStyle = '#fce38a'
            ctx.fillText(text, 230, 100)
        </script>
    </body>
</html>
